package service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import dao.CheckoutMapper;
import pojo.Checkout;

@Service
@Transactional
public class CheckoutServiceImpl implements CheckoutService {

	@Autowired
	private CheckoutMapper checkoutMapper;

	@Override
	public void insertcheckout(Checkout checkout) {
		checkoutMapper.insertcheckout(checkout);

	}

	@Override
	public List<Checkout> getallcheckout(Integer userid) {
		List<Checkout> checkout = checkoutMapper.getallcheckout(userid);
		return checkout;
	}

	@Override
	public void deletecheckout(Integer id) {

		checkoutMapper.deletecheckout(id);
	}

}
